package com.witdata.common.util;//package com.yanmeng.common.utils;
//
//import com.aliyun.dysmsapi20170525.models.SendSmsRequest;
//import com.aliyun.tea.TeaException;
//import com.aliyun.teaopenapi.models.Config;
//import com.aliyun.dysmsapi20170525.Client;
//import com.aliyun.teautil.Common;
//import com.aliyun.teautil.models.RuntimeOptions;
//import com.apistd.uni.Uni;
//import com.apistd.uni.UniException;
//import com.apistd.uni.UniResponse;
//import com.apistd.uni.sms.UniMessage;
//import com.apistd.uni.sms.UniSMS;
//
//import java.util.HashMap;
//import java.util.Map;
//
///**
// * DATETIME: 2024/2/18 21:37
// * USER: admin
// **/
//public class SampleUtils {
//    public static String ACCESS_KEY_ID = "SCR4gNSYzpq7FP6MS7P6AJDibiVwhhzvfxKsPNCSTWSujTkhm";
//    private static String ACCESS_KEY_SECRET = "22fsvkNnwrWAc5nwtVYUNdyr8hW8Rkd";
//
//
////    public static Client createClient(String accessKeyId, String accessKeySecret) throws Exception {
////        Config config = new Config()
////                .setAccessKeyId(accessKeyId)
////                .setAccessKeySecret(accessKeySecret);
////        config.endpoint = "dysmsapi.aliyuncs.com";
////        return new Client(config);
////    }
//
////    public static void main(String[] args) throws Exception {
////        Client client = SampleUtils.createClient("LTAI5tM5DFb2RmBgD18H7Pt8", "5Ttuaq5pGmrL3N61zdnsnPhtIE9ylW");
////        SendSmsRequest sendSmsRequest = new SendSmsRequest()
////                .setPhoneNumbers("19173746882")
////                .setSignName("研梦");
////        try {
////            client.sendSmsWithOptions(sendSmsRequest, new RuntimeOptions());
////        } catch (TeaException e){
////            System.out.println("e = " + e.getMessage());
////            System.out.println("e = " + e.getData().get("Recommend"));
////            Common.assertAsString(e.message);
////        }
////
////    }
//
//    public static void main(String[] args) {
//        Uni.init(ACCESS_KEY_ID, ACCESS_KEY_SECRET);
//        Map<String, String> temp = new HashMap<>();
//        temp.put("code", "6666");
//
//        UniMessage message = UniSMS.buildMessage()
//                .setTo("19173746882")
//                .setSignature("UniSMS")
//                .setTemplateId("login_templ")
//                .setTemplateData(temp);
//
//        try {
//            UniResponse response = message.send();
//            System.out.println("response = " + response);
//        } catch (UniException e){
//            System.out.println("e = " + e);
//        }
//    }
//}
